//
//  PlayerTopView.swift
//  HaiLuo
//
//  Created by Rowling on 2020/5/29.
//  Copyright © 2020 Rowling. All rights reserved.
//

import UIKit

class PlayerTopView: UIView {

    var backBtn : UIButton!
    
    override init(frame: CGRect) {
        super.init(frame: frame)
        setUI()
    }
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    func setUI() {
        backBtn = UIButton(type: .custom)
        backBtn.setImage(UIImage(named: "back_white"), for: .normal)
        addSubview(backBtn)
//        backBtn.imageEdgeInsets = UIEdgeInsets(top: 0, left: -16, bottom: 0, right: 0)
//        backBtn.contentEdgeInsets = UIEdgeInsets(top: 0, left: 16, bottom: 0, right: 0)
        makeConst()
    }
    
    func makeConst() {
        backBtn.snp.makeConstraints { (make) in
            make.left.equalTo(15)
            make.width.height.equalTo(30)
            make.centerY.equalToSuperview()
        }
    }

}
